import React from 'react';
import {observer,inject} from "mobx-react"
import Upload from "./upload"
@inject("store")
@observer
class UploadList extends React.Component {
    constructor() {
        super();
    }
    render() {
        console.log(this.props.store)
        let store=this.props.store
        let fileToUpload =store.fileToUpload
        let actions=store.actions
        return(
            <div>
                { fileToUpload[this.props.fileType].map(
                    (item) =><Upload filetype={this.props.fileType} id={item.id} fileitem={item.file} fileTo={actions.fileTo}/>
                ) }
            </div>
        );
    }
}
export default UploadList